import {defineStore} from "pinia";

/**
 * 角色store
 */
export const roleStore = defineStore('role', {
    state: () => ({
        openUpload: false,
        openAdd: false,
        roleId:0,
        grantPage:false,
        grantRoleId:0
    }),
    actions: {
        setOpenUpload(openUpload: boolean) {
            this.openUpload = openUpload
        },
        setOpenAdd(openAdd: boolean) {
            this.openAdd = openAdd
        },
        setRoleId(roleId: number) {
            this.roleId = roleId
        },
        setGrantPage(grantPage: boolean) {
            this.grantPage = grantPage
        },
        setGrantRoleId(grantRoleId: number) {
            this.grantRoleId = grantRoleId
        }
    }, getters: {}
})